<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
    <script>
        function getCookie(name) {
            const value = `; ${document.cookie}`;
            const parts = value.split(`; ${name}=`);
            if (parts.length === 2) return parts.pop().split(';').shift();
        }

        $(document).ready(function () {
            const token = getCookie('jwtToken');
            if (!token) {
                console.error('未找到 JWT Token');
                return;
            }

            $.ajax({
                url: '/OrderPay/getOrderPayList',
                type: 'GET',
                headers: {
                    'Authorization': `Bearer ${token}`
                },
                success: function () {
                    console.log('请求成功');
                },
                error: function (error) {
                    console.error('请求出错:', error);
                }
            });
        });
    </script>
</head>
<body>

</body>
</html>